﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CFSystem.JXC.Model;
using CFSystem.JXC.IDAL;
using CFSystem.JXC.DALFactory;
using CFSystem.JXC.AccessDAL;

namespace CFSystem.JXC.BLL
{
    public class InvChgReasonSetting
    {
         private static readonly InvTransReasonSetting dal = DALFactory.DataAccess.CreateInvTransReasonSetting();

         public InvChgReasonSetting()
        { }
        /// <summary>
        /// Method to get all categories
        /// </summary>										
        /// <returns>Generic List of CategoryInfo</returns>	   		
         public IList<InvTransReasonSettingInfo> GetInTransReasonSettings()
        {
            return dal.GetInTransReasonSettings();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
         public InvTransReasonSettingInfo  GetInvTransReasonSettingByID(int ID)
        {
            return dal.GetInvTransReasonSetting(ID);
        }
         /// <summary>
         /// insert Vendor into db.
         /// </summary>
         /// <param name="VendorName"></param>
        public void Insert(InvTransReasonSettingInfo  itrsinfo)
        {
            //check name
            
            //insert
            dal.InsertInvTransReasonSetting(itrsinfo);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="VendorID"></param>
        public void Delete(int itrsID)
        {
            dal.DelInvTransReasonSettingByID(itrsID);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="VendorID"></param>
        /// <param name="updValue"></param>
        public void Update(InvTransReasonSettingInfo itrsinfo)
        {
            dal.UpdateInvTransReasonSettingByID(itrsinfo);
        }
    }
}
